<template>
	<el-scrollbar class="aside">
	  <h1>优赞科技</h1>
	  <!-- {{routerList}} -->
	  <el-menu @select='onSelect'>
	    <el-menu-item :index="item.name" v-for="(item,index) in menuList" :key="item.path">
	      <template #title>
	        <el-icon>
	          <component :is='item.icon'/>
	        </el-icon>{{item.title}}
	      </template>
	    </el-menu-item>
	  </el-menu>
	</el-scrollbar>
</template>

<script lang="ts" setup>
	import {routerList} from '@/utils/config'
	import router from '@/router'
	import { Menu as IconMenu} from '@element-plus/icons-vue'
	const menuList = routerList
	const onSelect = name=>{
		 router.push({
			 name
		 });
	}
</script>

<style scoped lang="less">
	.dark .el-menu{
		--el-menu-bg-color:#1d3043 !important;
	}
	.aside{
		h1{
			color:#fff;
			height: 60px;
			text-align: center;
			line-height: 60px;
			font-size: 26px;
			text-shadow: 0px 0px 5px #000;
		}
		.el-menu{
			border-right: none;
			--el-menu-bg-color:#d9ecff;
		}
	}
</style>